dolphin_languages = [
    {
        "Chinese Name": "中文",
        "English Name": "Mandarin Chinese",
        "Language Code": "zh",
        "Region Code": [
            {
                "Language Region Code": "zh-CN",
                "English Name": "Chinese (Mandarin)",
                "Chinese Name": "中文(普通话)"
            },
            {
                "Language Region Code": "zh-TW",
                "English Name": "Chinese (Taiwan)",
                "Chinese Name": "中文(台湾)"
            },
            {
                "Language Region Code": "zh-WU",
                "English Name": "Chinese (Wuyu)",
                "Chinese Name": "中文(吴语)"
            },
            {
                "Language Region Code": "zh-SICHUAN",
                "English Name": "Chinese (Sichuan)",
                "Chinese Name": "中文(四川话)"
            },
            {
                "Language Region Code": "zh-SHANXI",
                "English Name": "Chinese (Shanxi)",
                "Chinese Name": "中文(山西话)"
            },
            {
                "Language Region Code": "zh-ANHUI",
                "English Name": "Chinese (Anhui)",
                "Chinese Name": "中文(安徽话)"
            },
            {
                "Language Region Code": "zh-TIANJIN",
                "English Name": "Chinese (Tianjin)",
                "Chinese Name": "中文(天津话)"
            },
            {
                "Language Region Code": "zh-NINGXIA",
                "English Name": "Chinese (Ningxia)",
                "Chinese Name": "中文(宁夏话)"
            },
            {
                "Language Region Code": "zh-SHAANXI",
                "English Name": "Chinese (Shaanxi)",
                "Chinese Name": "中文(陕西话)"
            },
            {
                "Language Region Code": "zh-HEBEI",
                "English Name": "Chinese (Hebei)",
                "Chinese Name": "中文(河北话)"
            },
            {
                "Language Region Code": "zh-SHANDONG",
                "English Name": "Chinese (Shandong)",
                "Chinese Name": "中文(山东话)"
            },
            {
                "Language Region Code": "zh-GUANGDONG",
                "English Name": "Chinese (Guangdong)",
                "Chinese Name": "中文(广东话)"
            },
            {
                "Language Region Code": "zh-SHANGHAI",
                "English Name": "Chinese (Shanghai)",
                "Chinese Name": "中文(上海话)"
            },
            {
                "Language Region Code": "zh-HUBEI",
                "English Name": "Chinese (Hubei)",
                "Chinese Name": "中文(湖北话)"
            },
            {
                "Language Region Code": "zh-LIAONING",
                "English Name": "Chinese (Liaoning)",
                "Chinese Name": "中文(辽宁话)"
            },
            {
                "Language Region Code": "zh-GANSU",
                "English Name": "Chinese (Gansu)",
                "Chinese Name": "中文(甘肃话)"
            },
            {
                "Language Region Code": "zh-FUJIAN",
                "English Name": "Chinese (Fujian)",
                "Chinese Name": "中文(福建话)"
            },
            {
                "Language Region Code": "zh-HUNAN",
                "English Name": "Chinese (Hunan)",
                "Chinese Name": "中文(湖南话)"
            },
            {
                "Language Region Code": "zh-HENAN",
                "English Name": "Chinese (Henan)",
                "Chinese Name": "中文(河南话)"
            },
            {
                "Language Region Code": "zh-YUNNAN",
                "English Name": "Chinese (Yunnan)",
                "Chinese Name": "中文(云南话)"
            },
            {
                "Language Region Code": "zh-MINNAN",
                "English Name": "Chinese (Minnan)",
                "Chinese Name": "中文(闽南语)"
            },
            {
                "Language Region Code": "zh-WENZHOU",
                "English Name": "Chinese (Wenzhou)",
                "Chinese Name": "中文(温州话)"
            }
        ]
    },
    {
        "Chinese Name": "日语",
        "English Name": "Japanese",
        "Language Code": "ja",
        "Region Code": [
            {
                "Language Region Code": "ja-JP",
                "English Name": "Japanese",
                "Chinese Name": "日语"
            }
        ]
    },
    {
        "Chinese Name": "泰语",
        "English Name": "Thai",
        "Language Code": "th",
        "Region Code": [
            {
                "Language Region Code": "th-TH",
                "English Name": "Thai",
                "Chinese Name": "泰语"
            }
        ]
    },
    {
        "Chinese Name": "俄语",
        "English Name": "Russian",
        "Language Code": "ru",
        "Region Code": [
            {
                "Language Region Code": "ru-RU",
                "English Name": "Russian",
                "Chinese Name": "俄语"
            }
        ]
    },
    {
        "Chinese Name": "韩语",
        "English Name": "Korean",
        "Language Code": "ko",
        "Region Code": [
            {
                "Language Region Code": "ko-KR",
                "English Name": "Korean",
                "Chinese Name": "韩语"
            }
        ]
    },
    {
        "Chinese Name": "印度尼西亚语",
        "English Name": "Indonesian",
        "Language Code": "id",
        "Region Code": [
            {
                "Language Region Code": "id-ID",
                "English Name": "Indonesian",
                "Chinese Name": "印度尼西亚语"
            }
        ]
    },
    {
        "Chinese Name": "越南语",
        "English Name": "Vietnamese",
        "Language Code": "vi",
        "Region Code": [
            {
                "Language Region Code": "vi-VN",
                "English Name": "Vietnamese",
                "Chinese Name": "越南语"
            }
        ]
    },
    {
        "Chinese Name": "粤语",
        "English Name": "Yue Chinese",
        "Language Code": "ct",
        "Region Code": [
            {
                "Language Region Code": "ct-NULL",
                "English Name": "Yue (Unknown)",
                "Chinese Name": "粤语(未知)"
            },
            {
                "Language Region Code": "ct-HK",
                "English Name": "Yue (Hongkong)",
                "Chinese Name": "粤语(香港)"
            },
            {
                "Language Region Code": "ct-GZ",
                "English Name": "Yue (Guangdong)",
                "Chinese Name": "粤语(广东)"
            }
        ]
    },
    {
        "Chinese Name": "印地语",
        "English Name": "Hindi",
        "Language Code": "hi",
        "Region Code": [
            {
                "Language Region Code": "hi-IN",
                "English Name": "Hindi",
                "Chinese Name": "印地语"
            }
        ]
    },
    {
        "Chinese Name": "乌尔都语",
        "English Name": "Urdu",
        "Language Code": "ur",
        "Region Code": [
            {
                "Language Region Code": "ur-PK",
                "English Name": "Urdu (Islamic Republic of Pakistan)",
                "Chinese Name": "乌尔都语"
            }
        ]
    },
    {
        "Chinese Name": "马来语",
        "English Name": "Malay",
        "Language Code": "ms",
        "Region Code": [
            {
                "Language Region Code": "ms-MY",
                "English Name": "Malay",
                "Chinese Name": "马来语"
            }
        ]
    },
    {
        "Chinese Name": "乌兹别克语",
        "English Name": "Uzbek",
        "Language Code": "uz",
        "Region Code": [
            {
                "Language Region Code": "uz-UZ",
                "English Name": "Uzbek",
                "Chinese Name": "乌兹别克语"
            }
        ]
    },
    {
        "Chinese Name": "阿拉伯语",
        "English Name": "Arabic",
        "Language Code": "ar",
        "Region Code": [
            {
                "Language Region Code": "ar-GLA",
                "English Name": "Arabic",
                "Chinese Name": "阿拉伯语"
            }
        ]
    },
    {
        "Chinese Name": "波斯语",
        "English Name": "Persian",
        "Language Code": "fa",
        "Region Code": [
            {
                "Language Region Code": "fa-IR",
                "English Name": "Persian",
                "Chinese Name": "波斯语"
            }
        ]
    },
    {
        "Chinese Name": "孟加拉语",
        "English Name": "Bengali",
        "Language Code": "bn",
        "Region Code": [
            {
                "Language Region Code": "bn-BD",
                "English Name": "Bengali",
                "Chinese Name": "孟加拉语"
            }
        ]
    },
    {
        "Chinese Name": "泰米尔语",
        "English Name": "Tamil",
        "Language Code": "ta",
        "Region Code": [
            {
                "Language Region Code": "ta-IN",
                "English Name": "Tamil (India)",
                "Chinese Name": "泰米尔语(印度)"
            },
            {
                "Language Region Code": "ta-SG",
                "English Name": "Tamil (Singaporean)",
                "Chinese Name": "泰米尔语(新加坡)"
            },
            {
                "Language Region Code": "ta-LK",
                "English Name": "Tamil (Sri Lankan)",
                "Chinese Name": "泰米尔语(斯里兰卡)"
            },
            {
                "Language Region Code": "ta-MY",
                "English Name": "Tamil (Malaysia)",
                "Chinese Name": "泰米尔语(马来西亚)"
            }
        ]
    },
    {
        "Chinese Name": "泰卢固语",
        "English Name": "Telugu",
        "Language Code": "te",
        "Region Code": [
            {
                "Language Region Code": "te-IN",
                "English Name": "Telugu",
                "Chinese Name": "泰卢固语"
            }
        ]
    },
    {
        "Chinese Name": "维吾尔语",
        "English Name": "Uighur",
        "Language Code": "ug",
        "Region Code": [
            {
                "Language Region Code": "ug-NULL",
                "English Name": "Uighur",
                "Chinese Name": "维吾尔语"
            },
            {
                "Language Region Code": "ug-CN",
                "English Name": "Uighur",
                "Chinese Name": "维吾尔语"
            }
        ]
    },
    {
        "Chinese Name": "古吉拉特语",
        "English Name": "Gujarati",
        "Language Code": "gu",
        "Region Code": [
            {
                "Language Region Code": "gu-IN",
                "English Name": "Gujarati",
                "Chinese Name": "古吉拉特语"
            }
        ]
    },
    {
        "Chinese Name": "缅甸语",
        "English Name": "Burmese",
        "Language Code": "my",
        "Region Code": [
            {
                "Language Region Code": "my-MM",
                "English Name": "Burmese",
                "Chinese Name": "缅甸语"
            }
        ]
    },
    {
        "Chinese Name": "塔加洛语",
        "English Name": "Tagalog",
        "Language Code": "tl",
        "Region Code": [
            {
                "Language Region Code": "tl-PH",
                "English Name": "Tagalog",
                "Chinese Name": "塔加洛语"
            }
        ]
    },
    {
        "Chinese Name": "哈萨克语",
        "English Name": "Kazakh",
        "Language Code": "kk",
        "Region Code": [
            {
                "Language Region Code": "kk-KZ",
                "English Name": "Kazakh",
                "Chinese Name": "哈萨克语"
            }
        ]
    },
    {
        "Chinese Name": "奥里亚语",
        "English Name": "Oriya / Odia",
        "Language Code": "or",
        "Region Code": [
            {
                "Language Region Code": "or-IN",
                "English Name": "Oriya / Odia",
                "Chinese Name": "奥里亚语"
            }
        ]
    },
    {
        "Chinese Name": "尼泊尔语",
        "English Name": "Nepali",
        "Language Code": "ne",
        "Region Code": [
            {
                "Language Region Code": "ne-NP",
                "English Name": "Nepali",
                "Chinese Name": "尼泊尔语"
            }
        ]
    },
    {
        "Chinese Name": "蒙古语",
        "English Name": "Mongolian",
        "Language Code": "mn",
        "Region Code": [
            {
                "Language Region Code": "mn-MN",
                "English Name": "Mongolian",
                "Chinese Name": "蒙古语"
            }
        ]
    },
    {
        "Chinese Name": "高棉语",
        "English Name": "Khmer",
        "Language Code": "km",
        "Region Code": [
            {
                "Language Region Code": "km-KH",
                "English Name": "Khmer",
                "Chinese Name": "高棉语"
            }
        ]
    },
    {
        "Chinese Name": "爪哇语",
        "English Name": "Javanese",
        "Language Code": "jv",
        "Region Code": [
            {
                "Language Region Code": "jv-ID",
                "English Name": "Javanese",
                "Chinese Name": "爪哇语"
            }
        ]
    },
    {
        "Chinese Name": "老挝语",
        "English Name": "Lao",
        "Language Code": "lo",
        "Region Code": [
            {
                "Language Region Code": "lo-LA",
                "English Name": "Lao",
                "Chinese Name": "老挝语"
            }
        ]
    },
    {
        "Chinese Name": "僧伽罗语",
        "English Name": "Sinhala",
        "Language Code": "si",
        "Region Code": [
            {
                "Language Region Code": "si-LK",
                "English Name": "Sinhala",
                "Chinese Name": "僧伽罗语"
            }
        ]
    },
    {
        "Chinese Name": "菲律宾语",
        "English Name": "Filipino",
        "Language Code": "fil",
        "Region Code": [
            {
                "Language Region Code": "fil-PH",
                "English Name": "Filipino",
                "Chinese Name": "菲律宾语"
            }
        ]
    },
    {
        "Chinese Name": "普什图语",
        "English Name": "Pushto",
        "Language Code": "ps",
        "Region Code": [
            {
                "Language Region Code": "ps-AF",
                "English Name": "Pushto",
                "Chinese Name": "普什图语"
            }
        ]
    },
    {
        "Chinese Name": "旁遮普语",
        "English Name": "Panjabi",
        "Language Code": "pa",
        "Region Code": [
            {
                "Language Region Code": "pa-IN",
                "English Name": "Panjabi",
                "Chinese Name": "旁遮普语"
            }
        ]
    },
    {
        "Chinese Name": "卡拜尔语",
        "English Name": "Kabyle",
        "Language Code": "kab",
        "Region Code": [
            {
                "Language Region Code": "kab-NULL",
                "English Name": "Kabyle",
                "Chinese Name": "卡拜尔语"
            }
        ]
    },
    {
        "Chinese Name": "巴什基尔语",
        "English Name": "Bashkir",
        "Language Code": "ba",
        "Region Code": [
            {
                "Language Region Code": "ba-NULL",
                "English Name": "Bashkir",
                "Chinese Name": "巴什基尔语"
            }
        ]
    },
    {
        "Chinese Name": "克什米尔语",
        "English Name": "Kashmiri",
        "Language Code": "ks",
        "Region Code": [
            {
                "Language Region Code": "ks-IN",
                "English Name": "Kashmiri",
                "Chinese Name": "克什米尔语"
            }
        ]
    },
    {
        "Chinese Name": "塔吉克语",
        "English Name": "Tajik",
        "Language Code": "tg",
        "Region Code": [
            {
                "Language Region Code": "tg-TJ",
                "English Name": "Tajik",
                "Chinese Name": "塔吉克语"
            }
        ]
    },
    {
        "Chinese Name": "巽他语",
        "English Name": "Sundanese",
        "Language Code": "su",
        "Region Code": [
            {
                "Language Region Code": "su-ID",
                "English Name": "Sundanese",
                "Chinese Name": "巽他语"
            }
        ]
    },
    {
        "Chinese Name": "马拉地语",
        "English Name": "Marathi",
        "Language Code": "mr",
        "Region Code": [
            {
                "Language Region Code": "mr-IN",
                "English Name": "Marathi",
                "Chinese Name": "马拉地语"
            }
        ]
    },
    {
        "Chinese Name": "吉尔吉斯语",
        "English Name": "Kirghiz",
        "Language Code": "ky",
        "Region Code": [
            {
                "Language Region Code": "ky-KG",
                "English Name": "Kirghiz",
                "Chinese Name": "吉尔吉斯语"
            }
        ]
    },
    {
        "Chinese Name": "阿塞拜疆语",
        "English Name": "Azerbaijani",
        "Language Code": "az",
        "Region Code": [
            {
                "Language Region Code": "az-AZ",
                "English Name": "Azerbaijani",
                "Chinese Name": "阿塞拜疆语"
            }
        ]
    }
]

def get_language_code(zh_text: str = "中文") -> str:
    for item in dolphin_languages:
        if item["Chinese Name"] == zh_text:
            return item["Language Code"]
    raise Exception(f"{zh_text} not in dolphin_languages !")

def get_region_code(zh_text: str = "中文") -> str:
    for item in dolphin_languages:
        if item["Chinese Name"] == zh_text:
            return item["Region Code"][0]["Language Region Code"]
    raise Exception(f"{zh_text} not in dolphin_languages !")